package com.eduagent.xwqeduagent.openFeign.client;

import com.eduagent.xwqeduagent.openFeign.entity.Student;
import com.eduagent.xwqeduagent.openFeign.entity.Teacher;
import com.eduagent.xwqeduagent.openFeign.entity.User;
import com.eduagent.xwqeduagent.openFeign.entity.UserAndRole;
import com.eduagent.xwqeduagent.openFeign.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "admin-service", url = "http://192.168.233.57:8187")
public interface AdminClient {

    @GetMapping("/admin/getStudentById/{id}")
    Result<Student> getStudentById(@PathVariable String id);

    @GetMapping("/admin/getUserById/{id}")
    Result<User> getUserById(@PathVariable String id);

    @GetMapping("/admin/getTeacherById/{id}")
    Result<Teacher> getTeacherById(@PathVariable String id);

    //  获取当前登录id和权限(分布开发测试接口)
    @GetMapping("/getLoginIdAndRole")
    Result<UserAndRole> getById();
}